"""

定义了一个学生类：
属性:学号，姓名，年龄，性别，身高，体重，成绩，家庭地址，电话号码。
student_id,name,age,sex,height,weight,score,adress,tel_number
行为：学习（要求参数传入学习的时间），玩游戏（要求参数传入游戏名），
study()   play()
编程（要求参数传入写代码的行数），数的求和（要求参数用变长参数来做，返回求和结果）
coding()  sum_number()

"""
# class student:
#     def __init__(self,student_id,name,age,sex,height,weight,score,address,tel_number):
#         self.student_id = student_id
#         self.name = name
#         self.age = age
#         self.sex = sex
#         self.height = height
#         self.weight = weight
#         self.score = score
#         self.address = address
#         self.tel_number = tel_number
#     def study(self,time):
#         print(f"{self.name}学习了{time}小时")
#     def play(self,game_name):
#         print(f"{self.name}在玩{game_name}游戏")
#     def coding(self,line):
#         print(f"{self.name}写了{line}行代码")
#     def sum_number(self,*add):
#         total = sum(add)
#         print(f"{self.name}计算的求和结果是{total}")
#         return total
#
# student1 = student(1,"john",18,"man",1.85,140,"good","新华街",15514569871)
# student1.study(2.5)
# student1.play("lol")
# student1.coding(5)
# student1.sum_number(10,20,30,40)


"""

ii.车类：
属性：车型号，车轮数，车身颜色，车重量，油箱存储大小 。
功能：跑（要求参数传入车的具体功能，比如越野，赛车）
创建：法拉利，宝马，铃木，五菱，拖拉机对象

"""
# class car:
#     def __init__(self,car_type,wheel_num,car_color,car_weight,oil_save):
#         self.car_type = car_type
#         self.wheel_num = wheel_num
#         self.car_color = car_color
#         self.car_weight = car_weight
#         self.oil_save = oil_save
#
#     def run(self,function):
#         print(f"{self.car_type}的具体功能{function}")
#
# car1 = car("法拉利",4,"red","150kg","50L")
# car2 = car("宝马",4,"write","12kg","20L")
# car3 = car("铃木",4,"blue","50kg","12L")
# car4 = car("五菱",4,"gray","20kg","18L")
# car5 = car("拖拉机",3,"orange","8kg","9L")
# car1.run("赛车")
# car2.run("赛车")
# car3.run("越野")
# car4.run("拉货")
# car5.run("上工")


"""

iii.笔记本：
属性：型号，待机时间，颜色，重量，cpu型号，内存大小，硬盘大小。  
行为：打游戏（传入游戏的名称）,办公。

"""
# class deskotp:
#     def __init__(self,desktop_type,wait_time,color,weight,cpu_type,memeory,ssd):
#         self.desktop_type = desktop_type
#         self.wait_time = wait_time
#         self.color = color
#         self.weight = weight
#         self.cpu_type = cpu_type
#         self.memeory = memeory
#         self.ssd = ssd
#
#     def play_game(self,game_name):
#         print(f"{self.desktop_type}支持打{game_name}游戏")
#
#     def work(self):
#         print(f"{self.desktop_type}支持办公")
#
# deskotp1 = deskotp("惠普","3s","write","2kg","i7",256,16)
#
# deskotp1.play_game("LOL")
# deskotp1.work()


"""

iv.猴子类：
属性：类别，性别，身体颜色，体重。
行为：造火（要求传入造火的材料：比如木棍还是石头），
学习事物（要求参数传入学习的具体事物，可以不止学习一种事物）

"""
# class monkey:
#     def __init__(self,type,sex,color,weight):
#         self.type =type
#         self.sex = sex
#         self.color = color
#         self.weight = weight
#
#     def make_fire(self,meterial):
#         print(f"{self.type}的猴子会使用{meterial}造火")
#
#     def study(self,thing):
#         print(f"{self.type}的猴子可以学习{thing}")
#
# m1 = monkey("白面环尾型","雄","yellow - write",60)
# m1.make_fire("木棍")
# m1.make_fire("扒香蕉皮")